from selenium.webdriver.support.wait import WebDriverWait
from utils import UtilsDriver

# 创建的基类
# 创建对象库层的基类
class BasePage:
    def __init__(self):
        self.driver=UtilsDriver.get_driver()

    def get_element(self,location):
        wait=WebDriverWait(self.driver,10,1)
        element=wait.until(lambda x:x.find_element(*location))
        return element

    # #切换进iframe表单
    # def SwitchFrame(self,ID):
    #     self.driver.switch_to.frame(ID)

# 创建操作层的基类
class BaseHandle:
    def input_text(self,element,text):
        element.clear()
        element.send_keys(text)
print()





